<template>
	<view class="content">
		<web-view :src="url" v-if="url.length"></web-view>
		<tui-modal></tui-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// url: 'http://172.30.247.171:8082/static/logistics.html',
				url: '',
				titletxt: '为您推荐',
				orderId:'123121231',
			}
		},
		onLoad(option) {
			// #ifdef H5
			   this.$wechat.noShare();
			// #endif
			 console.log(option.orderId)
			 var timeNew=new Date().getTime();
			 console.log(timeNew)
			this.orderId=option.orderId;
			var token=this.$util.getToken() 
			var tokenLo=token.split(' ')[1]
			// var tokenLo='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsaWNlbnNlIjoic28tZmFzdCIsInVzZXJfbmFtZSI6ImFkbWluIiwic2NvcGUiOlsicmVhZCIsIndyaXRlIl0sInVzZXJOYW1lIjoiYWRtaW4iLCJ1c2VySWQiOjEsImF1dGhvcml0aWVzIjpbImFkbWluIl0sImp0aSI6IjQyMjk2NTEzLWI5MzgtNDBmNi04YjFiLTFjM2Q5ODhkMDMzYSIsImNsaWVudF9pZCI6IndlYiJ9.-uom3YTNmFVvkx533ncXihOtBtxVb36I_ONZ_7sw1oI'
			// token=JSON.stringify(token)
			// this.url= `http://114.67.233.142:5626/static/logistics.html?orderId=${this.orderId}&token=${token}`
			this.url= `${this.$util.serviceUrl()}/static/logistics.html?orderId=${this.orderId}&token=${tokenLo}&time=${timeNew}`
			// this.url= `http://localhost:8080/static/logistics.html?orderId=${this.orderId}&token=${tokenLo}&time=${timeNew}`
			console.log(this.url)
			//这里对要传入到webview中的参数进行encodeURIComponent编码否则中文乱码
			// this.url+=encodeURIComponent(option.data)
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
